#include <iostream>
#include <cstdio>
#include <algorithm>
#include <map>
#include <cstring>
#include <vector>
#include<queue>
using namespace std;
#define MAXL 1000000005;
#define MAXLL 0x3f3f3f
struct jd
{
	int l, r;
};
int  a[1000000005];
void f1()
{
	int x, y,p;
	cin >> x >> y;
	p = a[x];
	a[x] = y;
	a[y] = p;
}
void f2()
{
	int x, p;
	cin >> x;
	p = a[x];
}
int main()
{
	int n, m,x;
	cin >> n >> m;
	cin >> x;
	a[x]
	while (n--)
	{

	}
	while (m--)
	{
		int op;
		cin >> op;
		if (op == 1)
		{
			f1();
		}
	}
}